/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.vacoor.nothing.web.misc.jms;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.core.JmsTemplate;

import javax.jms.*;

/**
 * @author vacoor
 */
public class NotifyMessageListener implements MessageListener {
    private static final Logger LOG = LoggerFactory.getLogger(NotifyMessageListener.class);
    private JmsTemplate jmsTemplate;

    @Override
    public void onMessage(Message message) {
        System.out.println(message);
        MapMessage msg = (MapMessage) message;
        /*
        TextMessage msg = (TextMessage) message;
        try {
            LOG.info("jms: {}", msg.getText());
            LOG.info("中文");
            System.out.println(jmsTemplate);
        } catch (JMSException e) {
            e.printStackTrace();
        }
        */
    }

}
